<template>
  <div class="form-container">
    <u-form :model="form" :rules="rules" ref="form">
      <Sign>3-1.经营性收入</Sign>
      <u-form-item
        :prop="`operatingIncome.${key}`"
        :label="`${formMap.operatingIncome[key]}：`"
        borderBottom
        label-width="100"
        v-for="(item, key) in form.operatingIncome"
        :key="key"
      >
        <u-input
          v-model="form.operatingIncome[key]"
          border="none"
          :disabled="key === 'selfEmployed'"
          placeholder="亩/只/元"
        ></u-input>
      </u-form-item>
      <u-form-item prop="operatingIncome.selfEmployed" borderBottom>
        <view class="title">个体经营：</view>
        <u-radio-group v-model="form.operatingIncome.selfEmployed" placement="column">
          <u-radio
            :customStyle="{ marginBottom: '40rpx' }"
            v-for="(item, index) in radioGroupList.selfEmployed_list"
            :key="index"
            :label="item.name"
            :name="item.name"
          ></u-radio>
        </u-radio-group>
      </u-form-item>

      <Sign>3-2.工资性收入</Sign>
      <u-form-item
        :prop="`wageIncome.${key}`"
        :label="`${formMap.wageIncome[key]}：`"
        borderBottom
        label-width="160"
        v-for="(item, key) in form.wageIncome"
        :key="key"
      >
        <u-input v-model="form.wageIncome[key]" border="none"></u-input>
      </u-form-item>

      <Sign>3-3.财产性收入</Sign>
      <u-form-item
        :prop="`propertyIncome.${key}`"
        :label="`${formMap.propertyIncome[key]}：`"
        borderBottom
        label-width="120"
        v-for="(item, key) in form.propertyIncome"
        :key="key"
      >
        <u-input v-model="form.propertyIncome[key]" type="digit" border="none" placeholder="收入（元/年）"></u-input>
      </u-form-item>

      <Sign>3-4.转移性收入</Sign>
      <u-form-item
        :prop="`transferIncome.${key}`"
        :label="`${formMap.transferIncome[key]}：`"
        borderBottom
        label-width="100"
        v-for="(item, key) in form.transferIncome"
        :key="key"
      >
        <u-input v-model="form.transferIncome[key]" type="digit" border="none" placeholder="收入（元/年）"></u-input>
      </u-form-item>
    </u-form>
  </div>
</template>

<script>
export default {
  props: {},
  data: () => ({
    form: {
      operatingIncome: {
        rice: "0",
        corn: "0",
        vegetables: "0",
        fruit: "0",
        tea: "0",
        plantingOther: "0",
        cattle: "0",
        pig: "0",
        sheep: "0",
        chicken: "0",
        duck: "0",
        goose: "0",
        fishPonds: "0",
        farmingOther: "0",
        selfEmployed: "服装店",
        selfEmployedOucome: "0",
      },
      wageIncome: {
        localFamlyNumber: "0",
        localFamlyIncome: "0",
        otherFamlyNumber: "0",
        otherFamlyIncome: "0",
        otherArea: "无",
      },
      propertyIncome: {
        landTransferFund: "0",
        depositInterest: "0",
        collectiveBonuses: "0",
        equityInterest: "0",
        realEstateRent: "0",
        financialDividends: "0",
      },
      transferIncome: {
        alimony: "0",
        groundSubsidy: "0",
        forestrySubsidy: "0",
        landSubsidies: "0",
        livingAllowances: "0",
        scholarship: "0",
        retirementPay: "0",
        povertyStrickenFund: "0",
      },
    },
    formMap: {
      operatingIncome: {
        rice: "水稻",
        corn: "玉米",
        vegetables: "蔬菜",
        fruit: "水果",
        tea: "茶叶",
        plantingOther: "种植业其他",
        cattle: "牛",
        pig: "猪",
        sheep: "羊",
        chicken: "鸡",
        duck: "鸭",
        goose: "鹅",
        fishPonds: "鱼塘",
        farmingOther: "养殖业其他",
        selfEmployed: "个体经营",
        selfEmployedOucome: "个体经营年收入",
      },
      wageIncome: {
        localFamlyNumber: "本地务工家庭成员",
        localFamlyIncome: "本地务工月工资收入",
        otherFamlyNumber: "外地务工家庭成员",
        otherFamlyIncome: "外地务工月工资收入",
        otherArea: "地区",
      },
      propertyIncome: {
        landTransferFund: "土地流转金",
        depositInterest: "存款利息",
        collectiveBonuses: "集体财产分红",
        equityInterest: "股票利息",
        realEstateRent: "不动产租金",
        financialDividends: "理财产品分红",
      },
      transferIncome: {
        alimony: "赡抚费",
        groundSubsidy: "失地补贴",
        forestrySubsidy: "林地补贴",
        landSubsidies: "耕地补助",
        livingAllowances: "低保补助",
        scholarship: "奖学金",
        retirementPay: "退休金",
        povertyStrickenFund: "特困金",
      },
    },
    radioGroupList: {
      selfEmployed_list: [{ name: "服装店" }, { name: "餐馆" }, { name: "便利店" }, { name: "其他" }],
    },
    rules: [],
  }),
  computed: {},
  methods: {},
  watch: {},

  // 组件周期函数--监听组件挂载完毕
  mounted() {},
}
</script>

<style lang="scss" scoped>
.form-container {
  box-sizing: border-box;
  padding: 20rpx;
  border-radius: 20rpx;
  background-color: #fff;

  .title {
    font-size: 32rpx;
    color: $uni-color-paragraph;
    font-weight: bold;
    margin-bottom: 40rpx;
  }
}
</style>
